package com.sf.hackathons.app.helper;


import com.sf.hackathons.app.bean.MailInfoCommitBean;
import com.sf.hackathons.app.constants.HttpConstants;
import com.sf.hackathons.lib.bean.UserInfo;
import com.sf.hackathons.lib.http.BaseHttpHelper;

import java.util.HashMap;

/**
 * Created by guofanghua on 2017/9/26.
 * 提交寄件信息
 */
public class MailInfoCommitlHelper extends BaseHttpHelper {

    public MailInfoCommitBean mMailInfoCommitBean = new MailInfoCommitBean();

    @Override
    public String initUrl() {
        return HttpConstants.URL_GROUP_JOIN;
    }

    @Override
    public HashMap<String, Object> initParameters() {
        HashMap<String, Object> mapParam = new HashMap<>();
        mapParam.put("averageWeight", mMailInfoCommitBean.getmMailWeight());
        mapParam.put("dailyQty", mMailInfoCommitBean.getmMailNum());
        mapParam.put("senderPhone", mMailInfoCommitBean.getmPhone());
        mapParam.put("toAddress", mMailInfoCommitBean.getmAddrDetail());
        mapParam.put("toArea", mMailInfoCommitBean.getmArea());
        mapParam.put("userId", UserInfo.userId);
        mapParam.put("sender",mMailInfoCommitBean.getmUserName());
        mapParam.put("groupId", mMailInfoCommitBean.getGroupId());
        return mapParam;

    }

    @Override
    public String initVerCode() {
        return HttpConstants.VERSION_1;
    }
}
